package main

import "fmt"

// 字符串翻转
func main() {
	s := "abcd"
	s1 := []byte(s)
	for i := 0; i < len(s1)/2; i++ {
		s1[i], s1[len(s1)-1-i] = s1[len(s1)-1-i], s1[i]
	}
	fmt.Println(string(s1))
}
